var Piloto = function() {
	var id, x, y, width, height, velocidad, vida, vision;
	var orientacion = 8;

	var getId = function() {
		return id;
	};

	var getX = function() {
		return parseFloat(x);
	};

	var getY = function() {
		return parseFloat(y);
	};
	
	var getVelocidad = function() {
		return velocidad;
	};

	var getVida = function() {
		return vida;
	};	

	var getWidth = function() {
		return width;
	};

	var getHeight = function() {
		return height;
	};

	var getVision = function() {
		return vision;
	};
	
	var getOrientacion = function() {
		return orientacion;
	};
		
	var setId = function(newId) {
		id = newId;
	};
		
	var setX = function(newX) {
		x = newX;
	};

	var setY = function(newY) {
		y = newY;
	};
	
	var setVelocidad = function(newVelocidad) {
		velocidad = newVelocidad;
	};
	
	var setVida = function(newVida) {
		vida = newVida;
	};
	
	var setVision = function(newVision) {
		vision = newVision;
	};		

	var setWidth = function(newWidth) {
		width = newWidth;
	};

	var setHeight = function(newHeight) {
		height = newHeight;
	};
	
	var setOrientacion = function(orient) {
		orientacion = orient;
	};
	
	var imageObj = new Image();
	imageObj.src = 'images/Soldier/SoldierDer1.png';
		
	var imageObj2 = new Image();
	imageObj2.src = 'images/Soldier/SoldierIzq1.png';
	
	var imageObj3 = new Image();
	imageObj3.src = 'images/Soldier/SoldierUp1.png';
	
	var imageObj4 = new Image();
	imageObj4.src = 'images/Soldier/SoldierDown1.png';
	
	var draw = function(canvas,orient){
		
			switch (orient){
			case 4:
				canvas.drawImage(imageObj2, getX(), getY());
				break;
			case 8:
				canvas.drawImage(imageObj3, getX(), getY());
				break;
			case 6:
				canvas.drawImage(imageObj, getX(), getY());
				break;
			case 2:
				canvas.drawImage(imageObj4, getX(), getY());
				break;
			}

	};
	
	return{		
		getId:getId,
		getX : getX,
		getY : getY,
		getVelocidad:getVelocidad,
		getVida:getVida,
		getVision:getVision,
		getWidth : getWidth,
		getHeight : getHeight,
		getOrientacion:getOrientacion,
		setId : setId,
		setX : setX,
		setY : setY,
		setVelocidad:setVelocidad,
		setVida:setVida,
		setVision:setVision,	
		setWidth : setWidth,
		setHeight : setHeight,
		setOrientacion:setOrientacion,
		draw:draw
	};
	
};